<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: CUVClient类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="../../d4/d48/class_c_u_v_client-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">CUVClient类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>使用libuv实现的客户端连接.主要面向PC端的应用开发支持，也可以将这个库移植到android和 IOS系统上完成三种应用上统一的接口。  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a>&gt;</code></p>
<div class="dynheader">
CUVClient 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../da/df4/class_c_u_v_client__coll__graph.png" border="0" usemap="#a_c_u_v_client_coll__map" alt="Collaboration graph"/></div>
<map name="a_c_u_v_client_coll__map" id="a_c_u_v_client_coll__map">
<area shape="rect" title="使用libuv实现的客户端连接.主要面向PC端的应用开发支持，也可以将这个库移植到android和 IOS系统上完成三种应用上统一的接口。" alt="" coords="5,5,169,939"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/dba/struct_c_u_v_client_1_1st__connreq.html">st_connreq</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d9a/struct_c_u_v_client_1_1st__wd.html">st_wd</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ad5bec78d0e2def9dc9ba3922a1882e58" id="r_ad5bec78d0e2def9dc9ba3922a1882e58"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a> { <br />
&#160;&#160;<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58ae3c9bbdab909aa76e8083f25588d4144">ERR_UVCLIENT_INIT_MUTEX</a> = -1000
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58aae261adeeb1d5836a7321560f1766f85">ERR_UVCLIENT_LOOP_CONFIG</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a4e5c95eaec1e996494fc22087b14978a">ERR_UVCLIENT_LOOP_INIT</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a0b461e4c214c215937c371a01dbbbfca">ERR_UVCLIENT_INIT_TCP</a>
, <br />
&#160;&#160;<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58abc96c2538ddf34e03726ff069564d8d0">ERR_UVCLIENT_OPERATION</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a9c10b23ae91200ca36f1c55d783964e0">ERR_UVCLIENT_ALOCMEM</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a66b0863905fd767a2e2b42030c18bec4">ERR_UVCLIENT_CONNECTION</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58aab6af6e1ea09e5e79f7448e05f105d80">ERR_UV_DNS_RESOLVE</a>
, <br />
&#160;&#160;<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a6d5ea39f90cf0cbd5ae24108811c7f0c">ERR_ALLOC_MEM</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58aa21929f4e89447ed2568f55661fe80bc">ERR_UVCLIENT_RECV</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a52c863e5726058cfb624aacb54a42762">ERR_UVCLIENT_SEND</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a503b1dc10bfb0898c95cb23bc936f116">ERR_UVCLIENT_DNS</a>
, <br />
&#160;&#160;<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a6bf07154c0b4ba6a5849a835738dd896">UV_CLIENT_CREATE_THD</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a13f2b6bc173e934bfb3039bb3454dba3">ERR_CONN_OVERTIME</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a1337d5e97c2217e467a29453df059d90">ERR_SEND_DATA_EMPTY</a>
, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a39ecc66b86ca7356cb023868919b086b">ERR_DATA_NULL</a>
, <br />
&#160;&#160;<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58a147327933a6559522b3d469d74212d87">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:ad5bec78d0e2def9dc9ba3922a1882e58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85f7389ef98f94406cfab70191465afe" id="r_a85f7389ef98f94406cfab70191465afe"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a85f7389ef98f94406cfab70191465afe">emErrCode</a> = <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a></td></tr>
<tr class="separator:a85f7389ef98f94406cfab70191465afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aa775314ab893e731e2dbb56cfdc605b9" id="r_aa775314ab893e731e2dbb56cfdc605b9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa775314ab893e731e2dbb56cfdc605b9">CUVClient</a> (const std::string &amp;url, int <a class="el" href="#a59c6686860298236ab1e539f961ba525">port</a>)</td></tr>
<tr class="memdesc:aa775314ab893e731e2dbb56cfdc605b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造客户端对象  <br /></td></tr>
<tr class="separator:aa775314ab893e731e2dbb56cfdc605b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76b2bfaf67b5633d2674516bf42f02b6" id="r_a76b2bfaf67b5633d2674516bf42f02b6"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a76b2bfaf67b5633d2674516bf42f02b6">~CUVClient</a> ()</td></tr>
<tr class="separator:a76b2bfaf67b5633d2674516bf42f02b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47ca5c1b3508b746a71f69ef87a04041" id="r_a47ca5c1b3508b746a71f69ef87a04041"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a47ca5c1b3508b746a71f69ef87a04041">connect</a> ()</td></tr>
<tr class="memdesc:a47ca5c1b3508b746a71f69ef87a04041"><td class="mdescLeft">&#160;</td><td class="mdescRight">外界操作连接口  <br /></td></tr>
<tr class="separator:a47ca5c1b3508b746a71f69ef87a04041"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86a1bd3a76549cfd783780a9f21cac8d" id="r_a86a1bd3a76549cfd783780a9f21cac8d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a86a1bd3a76549cfd783780a9f21cac8d">connect</a> (const std::string &amp;url, int <a class="el" href="#a59c6686860298236ab1e539f961ba525">port</a>)</td></tr>
<tr class="separator:a86a1bd3a76549cfd783780a9f21cac8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae40a32721569cbe4465dcbc89d028262" id="r_ae40a32721569cbe4465dcbc89d028262"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae40a32721569cbe4465dcbc89d028262">operator bool</a> ()</td></tr>
<tr class="memdesc:ae40a32721569cbe4465dcbc89d028262"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取连状态  <br /></td></tr>
<tr class="separator:ae40a32721569cbe4465dcbc89d028262"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b21869bfc5cdf67971cf4d3100efc6f" id="r_a0b21869bfc5cdf67971cf4d3100efc6f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0b21869bfc5cdf67971cf4d3100efc6f">isConnected</a> ()</td></tr>
<tr class="separator:a0b21869bfc5cdf67971cf4d3100efc6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fa40f908f40bc2fc0638ebce51cd220" id="r_a9fa40f908f40bc2fc0638ebce51cd220"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9fa40f908f40bc2fc0638ebce51cd220">Send</a> (const char *data, size_t s)</td></tr>
<tr class="memdesc:a9fa40f908f40bc2fc0638ebce51cd220"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送数据。这个函数发送的时候不会将要发送的数据拷贝到缓冲区中 因此需要在具体应用的时候进行数据内存管理。  <br /></td></tr>
<tr class="separator:a9fa40f908f40bc2fc0638ebce51cd220"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4429b8b21e1c6edf3780ac96dadb107a" id="r_a4429b8b21e1c6edf3780ac96dadb107a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4429b8b21e1c6edf3780ac96dadb107a">OnSend</a> (size_t s, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a> e)</td></tr>
<tr class="memdesc:a4429b8b21e1c6edf3780ac96dadb107a"><td class="mdescLeft">&#160;</td><td class="mdescRight">完成发送后会调用这个函数  <br /></td></tr>
<tr class="separator:a4429b8b21e1c6edf3780ac96dadb107a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abafcf34dfd18e780b6d9ae69347993d7" id="r_abafcf34dfd18e780b6d9ae69347993d7"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abafcf34dfd18e780b6d9ae69347993d7">OnRecv</a> (const char *, size_t, <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a>)</td></tr>
<tr class="memdesc:abafcf34dfd18e780b6d9ae69347993d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">接收到数据后，调用这个函数  <br /></td></tr>
<tr class="separator:abafcf34dfd18e780b6d9ae69347993d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebd24a8632f21e89f7bdb2946c5c1d3e" id="r_aebd24a8632f21e89f7bdb2946c5c1d3e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aebd24a8632f21e89f7bdb2946c5c1d3e">Close</a> ()</td></tr>
<tr class="memdesc:aebd24a8632f21e89f7bdb2946c5c1d3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">断开连接  <br /></td></tr>
<tr class="separator:aebd24a8632f21e89f7bdb2946c5c1d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af76e08cee2ed876b1274a1dd04817da6" id="r_af76e08cee2ed876b1274a1dd04817da6"><td class="memItemLeft" align="right" valign="top">uv_tcp_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af76e08cee2ed876b1274a1dd04817da6">Client</a> ()</td></tr>
<tr class="memdesc:af76e08cee2ed876b1274a1dd04817da6"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取客户端指针  <br /></td></tr>
<tr class="separator:af76e08cee2ed876b1274a1dd04817da6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a802a4b3d13020fd40e1ef5a753b46e3f" id="r_a802a4b3d13020fd40e1ef5a753b46e3f"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a802a4b3d13020fd40e1ef5a753b46e3f">GetURL</a> () const</td></tr>
<tr class="separator:a802a4b3d13020fd40e1ef5a753b46e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e531662e5c09c616bb50b797f49ac22" id="r_a9e531662e5c09c616bb50b797f49ac22"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9e531662e5c09c616bb50b797f49ac22">GetPort</a> ()</td></tr>
<tr class="separator:a9e531662e5c09c616bb50b797f49ac22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a898b996860b0e38d8f83f5bca9afbde1" id="r_a898b996860b0e38d8f83f5bca9afbde1"><td class="memItemLeft" align="right" valign="top">const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a898b996860b0e38d8f83f5bca9afbde1">server</a> () const</td></tr>
<tr class="memdesc:a898b996860b0e38d8f83f5bca9afbde1"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取服务端地址，可能是URL也可能是IP地址  <br /></td></tr>
<tr class="separator:a898b996860b0e38d8f83f5bca9afbde1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49f749be17943d78a3472807254b05fb" id="r_a49f749be17943d78a3472807254b05fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a49f749be17943d78a3472807254b05fb">server</a> (const std::string &amp;svr)</td></tr>
<tr class="memdesc:a49f749be17943d78a3472807254b05fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定远程服务器地址  <br /></td></tr>
<tr class="separator:a49f749be17943d78a3472807254b05fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59c6686860298236ab1e539f961ba525" id="r_a59c6686860298236ab1e539f961ba525"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a59c6686860298236ab1e539f961ba525">port</a> ()</td></tr>
<tr class="memdesc:a59c6686860298236ab1e539f961ba525"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取服务器端口  <br /></td></tr>
<tr class="separator:a59c6686860298236ab1e539f961ba525"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aecd5a533b5960854bb67535986b24e8c" id="r_aecd5a533b5960854bb67535986b24e8c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aecd5a533b5960854bb67535986b24e8c">port</a> (int port)</td></tr>
<tr class="memdesc:aecd5a533b5960854bb67535986b24e8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定服务器端口  <br /></td></tr>
<tr class="separator:aecd5a533b5960854bb67535986b24e8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f7a91e9651658b801d1955b88ccb957" id="r_a9f7a91e9651658b801d1955b88ccb957"><td class="memItemLeft" align="right" valign="top"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9f7a91e9651658b801d1955b88ccb957">Error</a> ()</td></tr>
<tr class="memdesc:a9f7a91e9651658b801d1955b88ccb957"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回操作错误代码  <br /></td></tr>
<tr class="separator:a9f7a91e9651658b801d1955b88ccb957"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa31faff813bc6892717e4a6397f518d9" id="r_aa31faff813bc6892717e4a6397f518d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa31faff813bc6892717e4a6397f518d9">Error</a> (int e)</td></tr>
<tr class="memdesc:aa31faff813bc6892717e4a6397f518d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取操作错误字符串描述  <br /></td></tr>
<tr class="separator:aa31faff813bc6892717e4a6397f518d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55fa1b5387858f986b051e2abaa358d6" id="r_a55fa1b5387858f986b051e2abaa358d6"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a55fa1b5387858f986b051e2abaa358d6">ErrMsg</a> ()</td></tr>
<tr class="memdesc:a55fa1b5387858f986b051e2abaa358d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取错误信息  <br /></td></tr>
<tr class="separator:a55fa1b5387858f986b051e2abaa358d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85c74bb0d72542e0a710ac1f10e2640b" id="r_a85c74bb0d72542e0a710ac1f10e2640b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a85c74bb0d72542e0a710ac1f10e2640b">onError</a> (int error)</td></tr>
<tr class="memdesc:a85c74bb0d72542e0a710ac1f10e2640b"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理libuv的错误  <br /></td></tr>
<tr class="separator:a85c74bb0d72542e0a710ac1f10e2640b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad88a2b7043d30c8cc6bd6541a9bae8f4" id="r_ad88a2b7043d30c8cc6bd6541a9bae8f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad88a2b7043d30c8cc6bd6541a9bae8f4">onShutdown</a> ()</td></tr>
<tr class="memdesc:ad88a2b7043d30c8cc6bd6541a9bae8f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理shutdown事件  <br /></td></tr>
<tr class="separator:ad88a2b7043d30c8cc6bd6541a9bae8f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f13c67e75922215b8e289de86ab3ad2" id="r_a2f13c67e75922215b8e289de86ab3ad2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2f13c67e75922215b8e289de86ab3ad2">OnClose</a> ()</td></tr>
<tr class="memdesc:a2f13c67e75922215b8e289de86ab3ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">处理通道关闭  <br /></td></tr>
<tr class="separator:a2f13c67e75922215b8e289de86ab3ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7367ec0e036e66075311573371038516" id="r_a7367ec0e036e66075311573371038516"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7367ec0e036e66075311573371038516">OnConnected</a> (<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a> e)</td></tr>
<tr class="memdesc:a7367ec0e036e66075311573371038516"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接后调用这个函数  <br /></td></tr>
<tr class="separator:a7367ec0e036e66075311573371038516"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e281fb0756bff921349e621177426f5" id="r_a5e281fb0756bff921349e621177426f5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5e281fb0756bff921349e621177426f5">on_open</a> (std::function&lt; void()&gt; fun)</td></tr>
<tr class="memdesc:a5e281fb0756bff921349e621177426f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置打开事𢓐回调函数  <br /></td></tr>
<tr class="separator:a5e281fb0756bff921349e621177426f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb0bccfc4b75000932f6f02f35a7e8fe" id="r_abb0bccfc4b75000932f6f02f35a7e8fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abb0bccfc4b75000932f6f02f35a7e8fe">on_close</a> (std::function&lt; void()&gt; f)</td></tr>
<tr class="memdesc:abb0bccfc4b75000932f6f02f35a7e8fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置关闭回调函数  <br /></td></tr>
<tr class="separator:abb0bccfc4b75000932f6f02f35a7e8fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8af8d7fc6f975a4f3e22ce3eb5720790" id="r_a8af8d7fc6f975a4f3e22ce3eb5720790"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8af8d7fc6f975a4f3e22ce3eb5720790">on_data</a> (std::function&lt; void(size_t, const char *) &gt; fun)</td></tr>
<tr class="memdesc:a8af8d7fc6f975a4f3e22ce3eb5720790"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置数据接收回调函数  <br /></td></tr>
<tr class="separator:a8af8d7fc6f975a4f3e22ce3eb5720790"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ea36bb84f8660466ffd83024bb0f400" id="r_a5ea36bb84f8660466ffd83024bb0f400"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5ea36bb84f8660466ffd83024bb0f400">on_error</a> (std::function&lt; void(<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::err_code</a>) &gt; f)</td></tr>
<tr class="memdesc:a5ea36bb84f8660466ffd83024bb0f400"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置错误处理回调函数  <br /></td></tr>
<tr class="separator:a5ea36bb84f8660466ffd83024bb0f400"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf27a8321a7a8b94267cdbb08e8c8f5d" id="r_abf27a8321a7a8b94267cdbb08e8c8f5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abf27a8321a7a8b94267cdbb08e8c8f5d">on_send</a> (std::function&lt; void(size_t)&gt; f)</td></tr>
<tr class="memdesc:abf27a8321a7a8b94267cdbb08e8c8f5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置发送完成回调函数  <br /></td></tr>
<tr class="separator:abf27a8321a7a8b94267cdbb08e8c8f5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a221ba3c964e7dd09d09c9c180a3c2557" id="r_a221ba3c964e7dd09d09c9c180a3c2557"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a221ba3c964e7dd09d09c9c180a3c2557">errMsg</a> (int e)</td></tr>
<tr class="separator:a221ba3c964e7dd09d09c9c180a3c2557"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ae74d74bc2a71385ecf47b7c0cb783610" id="r_ae74d74bc2a71385ecf47b7c0cb783610"><td class="memItemLeft" align="right" valign="top">uv_connect_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae74d74bc2a71385ecf47b7c0cb783610">req</a></td></tr>
<tr class="separator:ae74d74bc2a71385ecf47b7c0cb783610"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7caf0a98983c48c28eed874dfa0d20cd" id="r_a7caf0a98983c48c28eed874dfa0d20cd"><td class="memItemLeft" align="right" valign="top">uv_getaddrinfo_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7caf0a98983c48c28eed874dfa0d20cd">dns</a></td></tr>
<tr class="separator:a7caf0a98983c48c28eed874dfa0d20cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d5b60e39b3968c4876692fa0d3bab38" id="r_a9d5b60e39b3968c4876692fa0d3bab38"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9d5b60e39b3968c4876692fa0d3bab38">m_dns_flag</a></td></tr>
<tr class="separator:a9d5b60e39b3968c4876692fa0d3bab38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41faa71c0389b91d20414aec3a0cdf78" id="r_a41faa71c0389b91d20414aec3a0cdf78"><td class="memItemLeft" align="right" valign="top">std::atomic&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a41faa71c0389b91d20414aec3a0cdf78">m_conn_flag</a></td></tr>
<tr class="separator:a41faa71c0389b91d20414aec3a0cdf78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a288fed6612ea3141ecc2237568bf9fd7" id="r_a288fed6612ea3141ecc2237568bf9fd7"><td class="memItemLeft" align="right" valign="top">uv_mutex_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a288fed6612ea3141ecc2237568bf9fd7">m_mutex</a></td></tr>
<tr class="separator:a288fed6612ea3141ecc2237568bf9fd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60f2b108d764222bfcc50cbfdc535c63" id="r_a60f2b108d764222bfcc50cbfdc535c63"><td class="memItemLeft" align="right" valign="top">uv_buf_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a60f2b108d764222bfcc50cbfdc535c63">m_i_buf</a></td></tr>
<tr class="separator:a60f2b108d764222bfcc50cbfdc535c63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3342be4373da4e398853a23f95fbd9f9" id="r_a3342be4373da4e398853a23f95fbd9f9"><td class="memItemLeft" align="right" valign="top">uv_tcp_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3342be4373da4e398853a23f95fbd9f9">p_client</a></td></tr>
<tr class="separator:a3342be4373da4e398853a23f95fbd9f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a736629eeb5706e5faf32d26b0894ad78" id="r_a736629eeb5706e5faf32d26b0894ad78"><td class="memItemLeft" align="right" valign="top">std::atomic&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a736629eeb5706e5faf32d26b0894ad78">is_connected</a></td></tr>
<tr class="separator:a736629eeb5706e5faf32d26b0894ad78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8f31023e50ff317e9746c4af2442b5c" id="r_aa8f31023e50ff317e9746c4af2442b5c"><td class="memItemLeft" align="right" valign="top">std::atomic&lt; bool &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa8f31023e50ff317e9746c4af2442b5c">is_run</a></td></tr>
<tr class="separator:aa8f31023e50ff317e9746c4af2442b5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac22db94140177279708314568830256e" id="r_ac22db94140177279708314568830256e"><td class="memItemLeft" align="right" valign="top">std::function&lt; void(size_t, const char *)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac22db94140177279708314568830256e">cb_recv</a></td></tr>
<tr class="separator:ac22db94140177279708314568830256e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaac4ecbd575496ad48ba3953cfe422c7" id="r_aaac4ecbd575496ad48ba3953cfe422c7"><td class="memItemLeft" align="right" valign="top">std::function&lt; void(size_t)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaac4ecbd575496ad48ba3953cfe422c7">cb_send</a></td></tr>
<tr class="separator:aaac4ecbd575496ad48ba3953cfe422c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb8e88fe696e6bf387c52db105e5718c" id="r_aeb8e88fe696e6bf387c52db105e5718c"><td class="memItemLeft" align="right" valign="top">std::function&lt; void()&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aeb8e88fe696e6bf387c52db105e5718c">cb_close</a></td></tr>
<tr class="separator:aeb8e88fe696e6bf387c52db105e5718c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabfa4218e748e659129616623b14a46d" id="r_aabfa4218e748e659129616623b14a46d"><td class="memItemLeft" align="right" valign="top">std::function&lt; void()&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aabfa4218e748e659129616623b14a46d">cb_conn</a></td></tr>
<tr class="separator:aabfa4218e748e659129616623b14a46d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aade49f6b18bb580dacd6945ac074a16d" id="r_aade49f6b18bb580dacd6945ac074a16d"><td class="memItemLeft" align="right" valign="top">std::function&lt; void(const struct addrinfo *cb)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aade49f6b18bb580dacd6945ac074a16d">cb_resolv</a></td></tr>
<tr class="separator:aade49f6b18bb580dacd6945ac074a16d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d1d11c3b8b58c9e748ad8d40a23cb2c" id="r_a9d1d11c3b8b58c9e748ad8d40a23cb2c"><td class="memItemLeft" align="right" valign="top">std::function&lt; void(<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a>)&gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9d1d11c3b8b58c9e748ad8d40a23cb2c">cb_error</a></td></tr>
<tr class="separator:a9d1d11c3b8b58c9e748ad8d40a23cb2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>使用libuv实现的客户端连接.主要面向PC端的应用开发支持，也可以将这个库移植到android和 IOS系统上完成三种应用上统一的接口。 </p>
<dl class="section version"><dt>版本</dt><dd>1.1 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2017-2-14 ~ 2020-10-10 </dd></dl>
<dl class="section author"><dt>作者</dt><dd>宋炜 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00021">21</a> 行定义.</p>
</div><h2 class="groupheader">成员类型定义说明</h2>
<a id="a85f7389ef98f94406cfab70191465afe" name="a85f7389ef98f94406cfab70191465afe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85f7389ef98f94406cfab70191465afe">&#9670;&#160;</a></span>emErrCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::emErrCode</a> = <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00045">45</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员枚举类型说明</h2>
<a id="ad5bec78d0e2def9dc9ba3922a1882e58" name="ad5bec78d0e2def9dc9ba3922a1882e58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5bec78d0e2def9dc9ba3922a1882e58">&#9670;&#160;</a></span>err_code</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::err_code</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>客户端操作错误代码定义 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58ae3c9bbdab909aa76e8083f25588d4144" name="ad5bec78d0e2def9dc9ba3922a1882e58ae3c9bbdab909aa76e8083f25588d4144"></a>ERR_UVCLIENT_INIT_MUTEX&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58aae261adeeb1d5836a7321560f1766f85" name="ad5bec78d0e2def9dc9ba3922a1882e58aae261adeeb1d5836a7321560f1766f85"></a>ERR_UVCLIENT_LOOP_CONFIG&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a4e5c95eaec1e996494fc22087b14978a" name="ad5bec78d0e2def9dc9ba3922a1882e58a4e5c95eaec1e996494fc22087b14978a"></a>ERR_UVCLIENT_LOOP_INIT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a0b461e4c214c215937c371a01dbbbfca" name="ad5bec78d0e2def9dc9ba3922a1882e58a0b461e4c214c215937c371a01dbbbfca"></a>ERR_UVCLIENT_INIT_TCP&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58abc96c2538ddf34e03726ff069564d8d0" name="ad5bec78d0e2def9dc9ba3922a1882e58abc96c2538ddf34e03726ff069564d8d0"></a>ERR_UVCLIENT_OPERATION&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a9c10b23ae91200ca36f1c55d783964e0" name="ad5bec78d0e2def9dc9ba3922a1882e58a9c10b23ae91200ca36f1c55d783964e0"></a>ERR_UVCLIENT_ALOCMEM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a66b0863905fd767a2e2b42030c18bec4" name="ad5bec78d0e2def9dc9ba3922a1882e58a66b0863905fd767a2e2b42030c18bec4"></a>ERR_UVCLIENT_CONNECTION&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58aab6af6e1ea09e5e79f7448e05f105d80" name="ad5bec78d0e2def9dc9ba3922a1882e58aab6af6e1ea09e5e79f7448e05f105d80"></a>ERR_UV_DNS_RESOLVE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a6d5ea39f90cf0cbd5ae24108811c7f0c" name="ad5bec78d0e2def9dc9ba3922a1882e58a6d5ea39f90cf0cbd5ae24108811c7f0c"></a>ERR_ALLOC_MEM&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58aa21929f4e89447ed2568f55661fe80bc" name="ad5bec78d0e2def9dc9ba3922a1882e58aa21929f4e89447ed2568f55661fe80bc"></a>ERR_UVCLIENT_RECV&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a52c863e5726058cfb624aacb54a42762" name="ad5bec78d0e2def9dc9ba3922a1882e58a52c863e5726058cfb624aacb54a42762"></a>ERR_UVCLIENT_SEND&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a503b1dc10bfb0898c95cb23bc936f116" name="ad5bec78d0e2def9dc9ba3922a1882e58a503b1dc10bfb0898c95cb23bc936f116"></a>ERR_UVCLIENT_DNS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a6bf07154c0b4ba6a5849a835738dd896" name="ad5bec78d0e2def9dc9ba3922a1882e58a6bf07154c0b4ba6a5849a835738dd896"></a>UV_CLIENT_CREATE_THD&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a13f2b6bc173e934bfb3039bb3454dba3" name="ad5bec78d0e2def9dc9ba3922a1882e58a13f2b6bc173e934bfb3039bb3454dba3"></a>ERR_CONN_OVERTIME&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a1337d5e97c2217e467a29453df059d90" name="ad5bec78d0e2def9dc9ba3922a1882e58a1337d5e97c2217e467a29453df059d90"></a>ERR_SEND_DATA_EMPTY&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a39ecc66b86ca7356cb023868919b086b" name="ad5bec78d0e2def9dc9ba3922a1882e58a39ecc66b86ca7356cb023868919b086b"></a>ERR_DATA_NULL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ad5bec78d0e2def9dc9ba3922a1882e58a147327933a6559522b3d469d74212d87" name="ad5bec78d0e2def9dc9ba3922a1882e58a147327933a6559522b3d469d74212d87"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00026">26</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="aa775314ab893e731e2dbb56cfdc605b9" name="aa775314ab893e731e2dbb56cfdc605b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa775314ab893e731e2dbb56cfdc605b9">&#9670;&#160;</a></span>CUVClient()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CUVClient::CUVClient </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>url</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>port</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>构造客户端对象 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url,远程主机地址</td><td></td></tr>
    <tr><td class="paramname">port,远程服务端口</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00115">115</a> 行定义.</p>

</div>
</div>
<a id="a76b2bfaf67b5633d2674516bf42f02b6" name="a76b2bfaf67b5633d2674516bf42f02b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76b2bfaf67b5633d2674516bf42f02b6">&#9670;&#160;</a></span>~CUVClient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CUVClient::~CUVClient </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00132">132</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="af76e08cee2ed876b1274a1dd04817da6" name="af76e08cee2ed876b1274a1dd04817da6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af76e08cee2ed876b1274a1dd04817da6">&#9670;&#160;</a></span>Client()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uv_tcp_t * CUVClient::Client </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取客户端指针 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00194">194</a> 行定义.</p>

</div>
</div>
<a id="aebd24a8632f21e89f7bdb2946c5c1d3e" name="aebd24a8632f21e89f7bdb2946c5c1d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebd24a8632f21e89f7bdb2946c5c1d3e">&#9670;&#160;</a></span>Close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::Close </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>断开连接 </p>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00205">205</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_aebd24a8632f21e89f7bdb2946c5c1d3e_cgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_aebd24a8632f21e89f7bdb2946c5c1d3e_cgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_aebd24a8632f21e89f7bdb2946c5c1d3e_cgraph" id="adb/d6e/class_c_u_v_client_aebd24a8632f21e89f7bdb2946c5c1d3e_cgraph">
<area shape="rect" title="断开连接" alt="" coords="5,5,132,32"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#a41d289fd0817e859b813822d4f9f940c" title="响应uv_close操作的回调函数。" alt="" coords="180,5,274,32"/>
<area shape="poly" title=" " alt="" coords="132,16,164,16,164,21,132,21"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#a2f13c67e75922215b8e289de86ab3ad2" title="处理通道关闭" alt="" coords="322,5,465,32"/>
<area shape="poly" title=" " alt="" coords="274,16,306,16,306,21,274,21"/>
</map>
</div>

</div>
</div>
<a id="a47ca5c1b3508b746a71f69ef87a04041" name="a47ca5c1b3508b746a71f69ef87a04041"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47ca5c1b3508b746a71f69ef87a04041">&#9670;&#160;</a></span>connect() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::connect </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>外界操作连接口 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>， 服务器地址 </td></tr>
    <tr><td class="paramname">port</td><td>， 服务端口 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00453">453</a> 行定义.</p>

</div>
</div>
<a id="a86a1bd3a76549cfd783780a9f21cac8d" name="a86a1bd3a76549cfd783780a9f21cac8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86a1bd3a76549cfd783780a9f21cac8d">&#9670;&#160;</a></span>connect() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::connect </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>url</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>port</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00463">463</a> 行定义.</p>

</div>
</div>
<a id="a55fa1b5387858f986b051e2abaa358d6" name="a55fa1b5387858f986b051e2abaa358d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55fa1b5387858f986b051e2abaa358d6">&#9670;&#160;</a></span>ErrMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string CUVClient::ErrMsg </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取错误信息 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00250">250</a> 行定义.</p>

</div>
</div>
<a id="a221ba3c964e7dd09d09c9c180a3c2557" name="a221ba3c964e7dd09d09c9c180a3c2557"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a221ba3c964e7dd09d09c9c180a3c2557">&#9670;&#160;</a></span>errMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string CUVClient::errMsg </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00526">526</a> 行定义.</p>

</div>
</div>
<a id="a9f7a91e9651658b801d1955b88ccb957" name="a9f7a91e9651658b801d1955b88ccb957"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f7a91e9651658b801d1955b88ccb957">&#9670;&#160;</a></span>Error() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a> CUVClient::Error </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>返回操作错误代码 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00228">228</a> 行定义.</p>

</div>
</div>
<a id="aa31faff813bc6892717e4a6397f518d9" name="aa31faff813bc6892717e4a6397f518d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa31faff813bc6892717e4a6397f518d9">&#9670;&#160;</a></span>Error() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::Error </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取操作错误字符串描述 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">e[</td><td>I ]， 错误编号 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00236">236</a> 行定义.</p>

</div>
</div>
<a id="a9e531662e5c09c616bb50b797f49ac22" name="a9e531662e5c09c616bb50b797f49ac22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e531662e5c09c616bb50b797f49ac22">&#9670;&#160;</a></span>GetPort()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int CUVClient::GetPort </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00204">204</a> 行定义.</p>

</div>
</div>
<a id="a802a4b3d13020fd40e1ef5a753b46e3f" name="a802a4b3d13020fd40e1ef5a753b46e3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a802a4b3d13020fd40e1ef5a753b46e3f">&#9670;&#160;</a></span>GetURL()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; CUVClient::GetURL </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00199">199</a> 行定义.</p>

</div>
</div>
<a id="a0b21869bfc5cdf67971cf4d3100efc6f" name="a0b21869bfc5cdf67971cf4d3100efc6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b21869bfc5cdf67971cf4d3100efc6f">&#9670;&#160;</a></span>isConnected()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CUVClient::isConnected </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00162">162</a> 行定义.</p>

</div>
</div>
<a id="abb0bccfc4b75000932f6f02f35a7e8fe" name="abb0bccfc4b75000932f6f02f35a7e8fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb0bccfc4b75000932f6f02f35a7e8fe">&#9670;&#160;</a></span>on_close()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::on_close </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>f</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置关闭回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">f[</td><td>I ]， 关闭事件处理的回调函数 void fun(); </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00285">285</a> 行定义.</p>

</div>
</div>
<a id="a8af8d7fc6f975a4f3e22ce3eb5720790" name="a8af8d7fc6f975a4f3e22ce3eb5720790"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8af8d7fc6f975a4f3e22ce3eb5720790">&#9670;&#160;</a></span>on_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::on_data </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(size_t, const char *) &gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置数据接收回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun【</td><td>I 】接收到数据的回调函数 void fun( size_t len , const char * data ); </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00294">294</a> 行定义.</p>

</div>
</div>
<a id="a5ea36bb84f8660466ffd83024bb0f400" name="a5ea36bb84f8660466ffd83024bb0f400"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ea36bb84f8660466ffd83024bb0f400">&#9670;&#160;</a></span>on_error()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::on_error </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(<a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::err_code</a>) &gt;</td>          <td class="paramname"><span class="paramname"><em>f</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置错误处理回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">f【</td><td>I ]， 错误的回调函数 void fun( CUVClient::err_code e ); </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00303">303</a> 行定义.</p>

</div>
</div>
<a id="a5e281fb0756bff921349e621177426f5" name="a5e281fb0756bff921349e621177426f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e281fb0756bff921349e621177426f5">&#9670;&#160;</a></span>on_open()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::on_open </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置打开事𢓐回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>， 要设置的回调函数 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00276">276</a> 行定义.</p>

</div>
</div>
<a id="abf27a8321a7a8b94267cdbb08e8c8f5d" name="abf27a8321a7a8b94267cdbb08e8c8f5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf27a8321a7a8b94267cdbb08e8c8f5d">&#9670;&#160;</a></span>on_send()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::on_send </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void(size_t)&gt;</td>          <td class="paramname"><span class="paramname"><em>f</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置发送完成回调函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>[ I ], 发送完成的回调函数 函数原型为：void fun( size_t len ); ， len是已经发送数据长度 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00312">312</a> 行定义.</p>

</div>
</div>
<a id="a2f13c67e75922215b8e289de86ab3ad2" name="a2f13c67e75922215b8e289de86ab3ad2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f13c67e75922215b8e289de86ab3ad2">&#9670;&#160;</a></span>OnClose()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::OnClose </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>处理通道关闭 </p>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00215">215</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_a2f13c67e75922215b8e289de86ab3ad2_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_a2f13c67e75922215b8e289de86ab3ad2_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_a2f13c67e75922215b8e289de86ab3ad2_icgraph" id="adb/d6e/class_c_u_v_client_a2f13c67e75922215b8e289de86ab3ad2_icgraph">
<area shape="rect" title="处理通道关闭" alt="" coords="322,5,465,32"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#a41d289fd0817e859b813822d4f9f940c" title="响应uv_close操作的回调函数。" alt="" coords="180,5,274,32"/>
<area shape="poly" title=" " alt="" coords="307,21,274,21,274,16,307,16"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#aebd24a8632f21e89f7bdb2946c5c1d3e" title="断开连接" alt="" coords="5,5,132,32"/>
<area shape="poly" title=" " alt="" coords="164,21,132,21,132,16,164,16"/>
</map>
</div>

</div>
</div>
<a id="a7367ec0e036e66075311573371038516" name="a7367ec0e036e66075311573371038516"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7367ec0e036e66075311573371038516">&#9670;&#160;</a></span>OnConnected()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::OnConnected </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>连接后调用这个函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">e[</td><td>I ], 连接操作的错误代码 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00500">500</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_a7367ec0e036e66075311573371038516_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_a7367ec0e036e66075311573371038516_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_a7367ec0e036e66075311573371038516_icgraph" id="adb/d6e/class_c_u_v_client_a7367ec0e036e66075311573371038516_icgraph">
<area shape="rect" title="连接后调用这个函数" alt="" coords="167,5,339,32"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#ab394e4db7437ecfe63861efe5c8be24a" title=" " alt="" coords="5,5,119,32"/>
<area shape="poly" title=" " alt="" coords="151,21,119,21,119,16,151,16"/>
</map>
</div>

</div>
</div>
<a id="a85c74bb0d72542e0a710ac1f10e2640b" name="a85c74bb0d72542e0a710ac1f10e2640b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85c74bb0d72542e0a710ac1f10e2640b">&#9670;&#160;</a></span>onError()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::onError </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>error</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>处理libuv的错误 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">error[</td><td>I ], libuv错误编号 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00151">151</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_a85c74bb0d72542e0a710ac1f10e2640b_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_a85c74bb0d72542e0a710ac1f10e2640b_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_a85c74bb0d72542e0a710ac1f10e2640b_icgraph" id="adb/d6e/class_c_u_v_client_a85c74bb0d72542e0a710ac1f10e2640b_icgraph">
<area shape="rect" title="处理libuv的错误" alt="" coords="315,31,449,57"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#ab582a245cdc03170a2139958f00a858b" title=" " alt="" coords="177,5,266,32"/>
<area shape="poly" title=" " alt="" coords="299,34,266,28,266,23,300,28"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#a26cdfb66bef995e16bf2a18b2ae67717" title=" " alt="" coords="176,56,267,83"/>
<area shape="poly" title=" " alt="" coords="300,60,268,65,267,60,299,54"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#ab394e4db7437ecfe63861efe5c8be24a" title=" " alt="" coords="10,5,123,32"/>
<area shape="poly" title=" " alt="" coords="162,21,124,21,124,16,162,16"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#a9fa40f908f40bc2fc0638ebce51cd220" title="发送数据。这个函数发送的时候不会将要发送的数据拷贝到缓冲区中 因此需要在具体应用的时候进行数据内存管理。" alt="" coords="5,56,128,83"/>
<area shape="poly" title=" " alt="" coords="160,72,128,72,128,67,160,67"/>
</map>
</div>

</div>
</div>
<a id="abafcf34dfd18e780b6d9ae69347993d7" name="abafcf34dfd18e780b6d9ae69347993d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abafcf34dfd18e780b6d9ae69347993d7">&#9670;&#160;</a></span>OnRecv()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void CUVClient::OnRecv </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em></em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em></em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a></td>          <td class="paramname"><span class="paramname"><em></em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>接收到数据后，调用这个函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">buff</td><td>， 接收到的数据的缓冲区指针 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00186">186</a> 行定义.</p>

</div>
</div>
<a id="a4429b8b21e1c6edf3780ac96dadb107a" name="a4429b8b21e1c6edf3780ac96dadb107a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4429b8b21e1c6edf3780ac96dadb107a">&#9670;&#160;</a></span>OnSend()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::OnSend </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>s</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::err_code</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>完成发送后会调用这个函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">s,实际发送的长度</td><td></td></tr>
    <tr><td class="paramname">e,操作的错误代码</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00234">234</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_a4429b8b21e1c6edf3780ac96dadb107a_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_a4429b8b21e1c6edf3780ac96dadb107a_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_a4429b8b21e1c6edf3780ac96dadb107a_icgraph" id="adb/d6e/class_c_u_v_client_a4429b8b21e1c6edf3780ac96dadb107a_icgraph">
<area shape="rect" title="完成发送后会调用这个函数" alt="" coords="315,5,454,32"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#a26cdfb66bef995e16bf2a18b2ae67717" title=" " alt="" coords="176,5,267,32"/>
<area shape="poly" title=" " alt="" coords="300,21,267,21,267,16,300,16"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#a9fa40f908f40bc2fc0638ebce51cd220" title="发送数据。这个函数发送的时候不会将要发送的数据拷贝到缓冲区中 因此需要在具体应用的时候进行数据内存管理。" alt="" coords="5,5,128,32"/>
<area shape="poly" title=" " alt="" coords="160,21,128,21,128,16,160,16"/>
</map>
</div>

</div>
</div>
<a id="ad88a2b7043d30c8cc6bd6541a9bae8f4" name="ad88a2b7043d30c8cc6bd6541a9bae8f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad88a2b7043d30c8cc6bd6541a9bae8f4">&#9670;&#160;</a></span>onShutdown()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::onShutdown </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>处理shutdown事件 </p>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00139">139</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_ad88a2b7043d30c8cc6bd6541a9bae8f4_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_ad88a2b7043d30c8cc6bd6541a9bae8f4_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_ad88a2b7043d30c8cc6bd6541a9bae8f4_icgraph" id="adb/d6e/class_c_u_v_client_ad88a2b7043d30c8cc6bd6541a9bae8f4_icgraph">
<area shape="rect" title="处理shutdown事件" alt="" coords="186,5,350,32"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#ad8bf4cc413efef9934f6b58168d456fe" title=" " alt="" coords="5,5,138,32"/>
<area shape="poly" title=" " alt="" coords="170,21,138,21,138,16,170,16"/>
</map>
</div>

</div>
</div>
<a id="ae40a32721569cbe4465dcbc89d028262" name="ae40a32721569cbe4465dcbc89d028262"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae40a32721569cbe4465dcbc89d028262">&#9670;&#160;</a></span>operator bool()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CUVClient::operator bool </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取连状态 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00158">158</a> 行定义.</p>

</div>
</div>
<a id="a59c6686860298236ab1e539f961ba525" name="a59c6686860298236ab1e539f961ba525"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59c6686860298236ab1e539f961ba525">&#9670;&#160;</a></span>port() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int CUVClient::port </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取服务器端口 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00220">220</a> 行定义.</p>

</div>
</div>
<a id="aecd5a533b5960854bb67535986b24e8c" name="aecd5a533b5960854bb67535986b24e8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aecd5a533b5960854bb67535986b24e8c">&#9670;&#160;</a></span>port() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::port </td>
          <td>(</td>
          <td class="paramtype">int</td>          <td class="paramname"><span class="paramname"><em>port</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定服务器端口 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00224">224</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_cgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_cgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_cgraph" id="adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_cgraph">
<area shape="rect" title="指定服务器端口" alt="" coords="5,29,120,56"/>
<area shape="poly" title=" " alt="" coords="42,30,38,20,41,11,49,5,63,3,77,5,84,12,81,16,74,10,62,8,51,10,45,14,44,20,47,28"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_icgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_icgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_icgraph" id="adb/d6e/class_c_u_v_client_aecd5a533b5960854bb67535986b24e8c_icgraph">
<area shape="rect" title="指定服务器端口" alt="" coords="5,29,120,56"/>
<area shape="poly" title=" " alt="" coords="81,16,74,10,62,8,51,10,45,14,44,20,47,28,42,30,38,20,41,11,49,5,63,3,77,5,84,12"/>
</map>
</div>

</div>
</div>
<a id="a9fa40f908f40bc2fc0638ebce51cd220" name="a9fa40f908f40bc2fc0638ebce51cd220"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9fa40f908f40bc2fc0638ebce51cd220">&#9670;&#160;</a></span>Send()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">CUVClient::err_code</a> CUVClient::Send </td>
          <td>(</td>
          <td class="paramtype">const char *</td>          <td class="paramname"><span class="paramname"><em>data</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>s</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>发送数据。这个函数发送的时候不会将要发送的数据拷贝到缓冲区中 因此需要在具体应用的时候进行数据内存管理。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data,要发送的数据。</td><td></td></tr>
    <tr><td class="paramname">s,要发送的数据的长度</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">返回操作结果，成功返回OK,否则返回错误代码。</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">出现致命错误时抛出错误代码</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a> 第 <a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html#l00394">394</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d6e/class_c_u_v_client_a9fa40f908f40bc2fc0638ebce51cd220_cgraph.png" border="0" usemap="#adb/d6e/class_c_u_v_client_a9fa40f908f40bc2fc0638ebce51cd220_cgraph" alt=""/></div>
<map name="adb/d6e/class_c_u_v_client_a9fa40f908f40bc2fc0638ebce51cd220_cgraph" id="adb/d6e/class_c_u_v_client_a9fa40f908f40bc2fc0638ebce51cd220_cgraph">
<area shape="rect" title="发送数据。这个函数发送的时候不会将要发送的数据拷贝到缓冲区中 因此需要在具体应用的时候进行数据内存管理。" alt="" coords="5,31,128,57"/>
<area shape="rect" href="../../d6/d9a/uv__tcp__c_8cpp.html#a26cdfb66bef995e16bf2a18b2ae67717" title=" " alt="" coords="176,31,267,57"/>
<area shape="poly" title=" " alt="" coords="128,41,160,41,160,47,128,47"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#a85c74bb0d72542e0a710ac1f10e2640b" title="处理libuv的错误" alt="" coords="318,5,452,32"/>
<area shape="poly" title=" " alt="" coords="267,34,302,29,303,34,268,40"/>
<area shape="rect" href="../../db/d6e/class_c_u_v_client.html#a4429b8b21e1c6edf3780ac96dadb107a" title="完成发送后会调用这个函数" alt="" coords="315,56,454,83"/>
<area shape="poly" title=" " alt="" coords="268,48,300,54,299,59,267,54"/>
</map>
</div>

</div>
</div>
<a id="a898b996860b0e38d8f83f5bca9afbde1" name="a898b996860b0e38d8f83f5bca9afbde1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a898b996860b0e38d8f83f5bca9afbde1">&#9670;&#160;</a></span>server() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::string &amp; CUVClient::server </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取服务端地址，可能是URL也可能是IP地址 </p>
<dl class="section return"><dt>返回</dt><dd>远程地址内容 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00212">212</a> 行定义.</p>

</div>
</div>
<a id="a49f749be17943d78a3472807254b05fb" name="a49f749be17943d78a3472807254b05fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49f749be17943d78a3472807254b05fb">&#9670;&#160;</a></span>server() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CUVClient::server </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>svr</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定远程服务器地址 </p>

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00216">216</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="aeb8e88fe696e6bf387c52db105e5718c" name="aeb8e88fe696e6bf387c52db105e5718c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb8e88fe696e6bf387c52db105e5718c">&#9670;&#160;</a></span>cb_close</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void ()&gt; CUVClient::cb_close</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00082">82</a> 行定义.</p>

</div>
</div>
<a id="aabfa4218e748e659129616623b14a46d" name="aabfa4218e748e659129616623b14a46d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabfa4218e748e659129616623b14a46d">&#9670;&#160;</a></span>cb_conn</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void ()&gt; CUVClient::cb_conn</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00083">83</a> 行定义.</p>

</div>
</div>
<a id="a9d1d11c3b8b58c9e748ad8d40a23cb2c" name="a9d1d11c3b8b58c9e748ad8d40a23cb2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d1d11c3b8b58c9e748ad8d40a23cb2c">&#9670;&#160;</a></span>cb_error</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void( <a class="el" href="#ad5bec78d0e2def9dc9ba3922a1882e58">err_code</a> )&gt; CUVClient::cb_error</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00085">85</a> 行定义.</p>

</div>
</div>
<a id="ac22db94140177279708314568830256e" name="ac22db94140177279708314568830256e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22db94140177279708314568830256e">&#9670;&#160;</a></span>cb_recv</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void ( size_t , const char * )&gt; CUVClient::cb_recv</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00080">80</a> 行定义.</p>

</div>
</div>
<a id="aade49f6b18bb580dacd6945ac074a16d" name="aade49f6b18bb580dacd6945ac074a16d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aade49f6b18bb580dacd6945ac074a16d">&#9670;&#160;</a></span>cb_resolv</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void( const struct addrinfo* cb )&gt; CUVClient::cb_resolv</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00084">84</a> 行定义.</p>

</div>
</div>
<a id="aaac4ecbd575496ad48ba3953cfe422c7" name="aaac4ecbd575496ad48ba3953cfe422c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaac4ecbd575496ad48ba3953cfe422c7">&#9670;&#160;</a></span>cb_send</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::function&lt; void ( size_t )&gt; CUVClient::cb_send</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00081">81</a> 行定义.</p>

</div>
</div>
<a id="a7caf0a98983c48c28eed874dfa0d20cd" name="a7caf0a98983c48c28eed874dfa0d20cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7caf0a98983c48c28eed874dfa0d20cd">&#9670;&#160;</a></span>dns</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_getaddrinfo_t CUVClient::dns</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00069">69</a> 行定义.</p>

</div>
</div>
<a id="a736629eeb5706e5faf32d26b0894ad78" name="a736629eeb5706e5faf32d26b0894ad78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a736629eeb5706e5faf32d26b0894ad78">&#9670;&#160;</a></span>is_connected</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::atomic&lt;bool&gt; CUVClient::is_connected</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00077">77</a> 行定义.</p>

</div>
</div>
<a id="aa8f31023e50ff317e9746c4af2442b5c" name="aa8f31023e50ff317e9746c4af2442b5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8f31023e50ff317e9746c4af2442b5c">&#9670;&#160;</a></span>is_run</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::atomic&lt;bool&gt; CUVClient::is_run</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00078">78</a> 行定义.</p>

</div>
</div>
<a id="a41faa71c0389b91d20414aec3a0cdf78" name="a41faa71c0389b91d20414aec3a0cdf78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41faa71c0389b91d20414aec3a0cdf78">&#9670;&#160;</a></span>m_conn_flag</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::atomic&lt;bool&gt; CUVClient::m_conn_flag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00072">72</a> 行定义.</p>

</div>
</div>
<a id="a9d5b60e39b3968c4876692fa0d3bab38" name="a9d5b60e39b3968c4876692fa0d3bab38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d5b60e39b3968c4876692fa0d3bab38">&#9670;&#160;</a></span>m_dns_flag</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CUVClient::m_dns_flag</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00071">71</a> 行定义.</p>

</div>
</div>
<a id="a60f2b108d764222bfcc50cbfdc535c63" name="a60f2b108d764222bfcc50cbfdc535c63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60f2b108d764222bfcc50cbfdc535c63">&#9670;&#160;</a></span>m_i_buf</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_buf_t CUVClient::m_i_buf</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00075">75</a> 行定义.</p>

</div>
</div>
<a id="a288fed6612ea3141ecc2237568bf9fd7" name="a288fed6612ea3141ecc2237568bf9fd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a288fed6612ea3141ecc2237568bf9fd7">&#9670;&#160;</a></span>m_mutex</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_mutex_t CUVClient::m_mutex</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00073">73</a> 行定义.</p>

</div>
</div>
<a id="a3342be4373da4e398853a23f95fbd9f9" name="a3342be4373da4e398853a23f95fbd9f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3342be4373da4e398853a23f95fbd9f9">&#9670;&#160;</a></span>p_client</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_tcp_t* CUVClient::p_client</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00076">76</a> 行定义.</p>

</div>
</div>
<a id="ae74d74bc2a71385ecf47b7c0cb783610" name="ae74d74bc2a71385ecf47b7c0cb783610"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae74d74bc2a71385ecf47b7c0cb783610">&#9670;&#160;</a></span>req</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_connect_t CUVClient::req</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a> 第 <a class="el" href="../../d5/d16/tcpbase_8hpp_source.html#l00068">68</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../d5/d16/tcpbase_8hpp_source.html">tcpbase.hpp</a></li>
<li>src/<a class="el" href="../../d6/d9a/uv__tcp__c_8cpp_source.html">uv_tcp_c.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
